package team.seekers.oj.codetest.entity.dao;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import team.seekers.oj.common.entity.BaseDO;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(CodeTestDOField.TABLE_NAME)
public class CodeTestDO extends BaseDO {

    @TableId(value = CodeTestDOField.ID, type = IdType.AUTO)
    private Long id;

    @TableField(CodeTestDOField.CODE)
    private String code;

    @TableField(CodeTestDOField.IS_PUBLIC)
    private Integer isPublic;

    @TableField(CodeTestDOField.USER_ID)
    private Long userId;

    @TableField(CodeTestDOField.NAME)
    private String name;

    @TableField(CodeTestDOField.USERS)
    private byte[] users; // userId 列表

    @TableField(CodeTestDOField.USER_NUM)
    private Integer userNum;

    @TableField(CodeTestDOField.PROBLEMS)
    private byte[] problems; // problemId 列表

    @TableField(CodeTestDOField.PROBLEM_NUM)
    private Integer problemNum;

    @TableField(CodeTestDOField.DESCRIPTION_ID)
    private Long descriptionId;

    @TableField(CodeTestDOField.DELETED)
    //@TableLogic(value = "0", delval = "1")
    private Integer deleted;

    @TableField(CodeTestDOField.TYPE)
    private Integer type;

    @TableField(CodeTestDOField.VERSION)
    @Version
    private Integer version;

    @TableField(value = CodeTestDOField.GMT_CREATE, fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(value = CodeTestDOField.GMT_MODIFIED, fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


}
